package com.zhongya.example.view

import android.content.Context
import android.graphics.*
import android.graphics.Color.RED
import android.util.AttributeSet
import android.view.View

class BlurMaskFilterView : View {

    val mPaint = Paint()

    constructor(context: Context) : super(context) {

    }

    constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
        setLayerType(LAYER_TYPE_SOFTWARE,null)
        mPaint.color = Color.RED

        mPaint.maskFilter = BlurMaskFilter(50f,BlurMaskFilter.Blur.INNER)


    }

    override fun onDraw(canvas: Canvas?) {
        super.onDraw(canvas)

        canvas?.drawCircle(200f,200f,100f,mPaint)

    }



}